import Vue from 'vue'
import Router from 'vue-router'
import demo from './views/demo.vue'
import parseXML from './views/parseXML.vue'
Vue.use(Router)

export default new Router({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
            path: '/',
            name: 'main',
            redirect: '/home'
        },
        {
            path: '/home',
            name: 'main',
            component: () =>
                import ('./views/tsMeau/main.vue'),
            children: [{
                    path: '/checked',
                    name: 'checked',
                    component: () =>
                        import ('./views/tsChecked/index.vue')
                },
                {
                    path: '/table',
                    name: 'ts-table',
                    component: () =>
                        import ('./views/tsTable/table.vue')
                },
                {
                    path: '/tablePage',
                    name: 'tablePage',
                    component: () =>
                        import ('./views/tsTable/tablePage.vue')
                },
                {
                    path: '/treetable',
                    name: 'treetable',
                    component: () =>
                        import ('./views/tsTable/tableTree.vue')
                },
                {
                    path: '/demo',
                    name: 'demo',
                    component: demo
                },
                {
                    path: '/chart',
                    name: 'chart',
                    component: () =>
                        import ('./views/tsG2Plot/index.vue')
                },
                {
                    path: '/customChart',
                    name: 'tsCustom',
                    component: () =>
                        import ('./views/tsCustomChart/index.vue')
                },
                {
                    path: '/chart2',
                    name: 'chart2',
                    component: () =>
                        import ('./views/tsG2Plot/chart2.vue')
                },
                {
                    path: '/g2chart',
                    name: 'g2chart',
                    component: () =>
                        import ('./views/tsG2Chart/index.vue')
                },
                {
                    path: '/select',
                    name: 'ts-select',
                    component: () =>
                        import ('./views/tsSelect/index.vue')
                },
                {
                    path: '/tree',
                    name: 'ts-tree',
                    component: () =>
                        import ('./views/tsTree/index.vue')
                },

                {
                    path: '/dialog',
                    name: 'ts-dialog',
                    component: () =>
                        import ('./views/tsDialog/index.vue')
                },
                {
                    path: '/tsEmpty',
                    name: 'ts-empty',
                    component: () =>
                        import ('./views/tsEmpty/index.vue')
                },
                {
                    path: '/textarea',
                    name: 'textarea',
                    component: () =>
                        import ('./views/tsTextarea/index.vue')
                },
                {
                    path: '/parseXML',
                    name: 'parseXML',
                    component: parseXML
                }


            ]
        },

    ]
})